package cc.w3d.jawos.apps.artiks.client.rpc;

import com.google.gwt.user.client.rpc.AsyncCallback;

public abstract class ArtiksAsyncCallback<T> implements AsyncCallback<T>
{
	public ArtiksAsyncCallback()
		{ArtiksService.showProcessingPopup();}

	public void onFailure(Throwable caught)
	{
		ArtiksService.hideProcessingPopup();
		ArtiksService.reportError("ERROR: " + caught);
	}

	public void onSuccess(T result)
	{
		ArtiksService.hideProcessingPopup();
		onFinish(result);
	}

	public abstract void onFinish(T result);
}
